package co.fitstart.market.service;

import java.util.Date;
import java.util.List;

import co.fitstart.entity.market.DailyStatus;
import co.fitstart.entity.market.MarketBatchCourseware;
import co.fitstart.entity.market.MarketCourse;
import co.fitstart.entity.market.MarketCourseRound;
import co.fitstart.entity.market.MarketDailyCourseware;
import co.fitstart.entity.market.MarketMonthlyCourseware;
import co.fitstart.entity.market.MarketWechatImage;
import co.fitstart.entity.market.TrainingRecord;
import co.fitstart.entity.user.User;

public interface CoursewareService {
    
    /**
     * 
     * @param courseId
     * @return
     */
    public MarketCourse loadCourse(Long courseId);
    
    /**
     * 
     * @return
     */
    public List<MarketCourse> listCourse();
    
    /**
     * 
     * @param courseRound
     * @return
     */
    public List<MarketMonthlyCourseware> listMonthlyCourseware(MarketCourseRound courseRound);
    
    /**
     * 
     * @param courseRound
     * @return
     */
    public MarketMonthlyCourseware loadMonthlyCourseware(MarketCourseRound courseRound);
    
    /**
     * 
     * @param monthlyId
     * @return
     */
    public MarketMonthlyCourseware loadMonthlyCourseware(Long monthlyId);
    
    /**
     * 
     * @param listBatchCourseware
     * @return
     */
    public List<MarketBatchCourseware> listBatchCourseware(MarketMonthlyCourseware listBatchCourseware);
    
    /**
     * 
     * @param batchId
     * @return
     */
    public MarketBatchCourseware loadBatchCourseware(Long batchId);
    
    /**
     * 
     * @param monthly
     * @return
     */
    public MarketBatchCourseware loadBatchCourseware(MarketMonthlyCourseware monthly);
    
    /**
     * 
     * @param batch
     * @param status
     * @return
     */
    public List<MarketDailyCourseware> listDailyCourseware(MarketBatchCourseware batch, DailyStatus status);
    
    /**
     * 
     * @param dailyId
     * @return
     */
    public MarketDailyCourseware loadDailyCourseware(Long dailyId);
    
    /**
     * 
     * @param batch
     * @return
     */
    public MarketDailyCourseware loadDailyCourseware(MarketBatchCourseware batch);
    
    /**
     * 
     * @param dailyCourseware
     * @param user
     */
    public void startTrain(MarketDailyCourseware dailyCourseware, User user);
    
    /**
     * 
     * @param dailyCourseware
     * @param user
     */
    public void finishTrain(MarketDailyCourseware dailyCourseware, User user);
    
    /**
     * 
     * @param courseRound
     * @return
     */
    public int getFinishedAction(MarketCourseRound courseRound);
    
    /**
     * 
     * @param date
     * @param user
     * @return
     */
    public int countDailyTrainingRecord(Date date, User user);
    
    /**
     * 
     * @param user
     * @param date
     * @return
     */
    public TrainingRecord getTrainRecord(User user, Date date);
    
    /**
     * 
     * @param userOpenid
     * @param course
     * @param recommender
     */
//    public void particate(String userOpenid, MarketCourse course, String recommender);
    
    /**
     * 
     * @param course
     * @return
     */
    public MarketWechatImage getMarketWechatImage(MarketCourse course);

}
